// dao 与数据库交互
module.exports = {
  insert:
    "INSERT INTO user(phone, username, password, createtime, updatetime) VALUES(?,?,?,?,?)",
  update: "update user set name=?, age=? where id=?",
  delete: "delete from user where id=?",
  queryById: "select * from user where id=?",
  queryByName: "SELECT * FROM user WHERE username = ?",
  queryByPhone: "SELECT * FROM user WHERE phone = ?",
  queryByPhoneAndPassword:
    "SELECT * FROM user WHERE phone = ? AND password = ?",
  queryAll: "select * from user",
  has: "SELECT * FROM users WHERE uid = ?",
  // update: "UPDATE users SET ? WHERE uid = ?",
  // insert: "INSERT INTO users SET ?",
  getid:
    "select users.uid, users.uname, ccomment, ctime from users letf join comment on comment",
};
